<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>
		<meta charset="UTF-8">
		<title>智能报修系统——管理人员</title>
		<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/rightDiv.css"/>
		<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/manager.css"/>
		<!--引入交互所需css-->
		<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/jNotify.jquery.css"/>
		<script src="<%= request.getContextPath()%>resources/js/manager.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body ng-app="managerApp">
	<%System.out.println(basePath);%>
		<!--头部开始-->
		<div id="head">
			<div id="head_con">
				<p class="title">智能报修系统</p>
				<div class="phoneNum"  ng-controller="servicenumCtrl">
					服务电话：
				<span id="servicenum">
					{{servicephone}}
				</span>
				</div>
			</div>

		</div>
		<!--头部结束-->
		<!--左边开始-->
		<div id="staffLeft">
			<div id="staffLeftCon">
				<!--管理人员的信息-->
			<div id="staffInfo">
				<!--姓名-->
				<p class="staffName">admin</p>
				<!--客服学号-->
				<!--<p class="staffNum">1506111111</p>-->
				<!--职位-->
				<p class="place">管理人员</p>
			</div>
			<div id="operation">
				<ul>
					<li id="complainli" class="active">投诉管理</li>
					<li id="createli">创建工单</li>
					<li id="ordermanageli">工单管理</li>
					<li id="faultli">故障分类管理</li>
					<li id="totalorderli">工单统计报表</li>
					<li id="performancesli">运维人员业绩</li>
					<li id="worktypeli">运维人员管理</li>
					<li id="websiteli">网站管理</li>
				</ul>
			</div>
			</div>
		</div>
		<!--左边结束-->
		<!--右边开始-->
		<div id="pushOrdersRight">
			<div id="pushOrdersRight_con">
				
					<!--投诉管理开始-->
		<div id="complainMangement" class="turndiv" ng-controller="complainMangementCtrl">
			<div id="all">
				<ul>
					<li id="unfinish" class="now" ng-click="unhandledComplaints()"><a href="#">未处理投诉</a></li>
					<li id="finish" ng-click="handledComplaints()"><a href="#">已处理投诉</a></li>
				</ul>
			</div>			
			<table id="alternatecolor" class="altrowstable">				
				<thead>
					<tr>
						<th>时间</th>
						<th>工单号</th>
						<th>故障种类</th>
						<th>运维人员</th>
						<th>投诉人联系方式</th> <!--已归档 处理中 未处理-->
						<th>删除</th>
						<th ng-show="unhandledComplaintListShow">归档</th>
					</tr>
				</thead>
				<tbody>
					<tr id="unhandledComplaintList" ng-repeat="complain in complains" ng-show="unhandledComplaintListShow">

						<td>{{complain.uploadTime | newtime}}</td>
						<td>{{complain.jobnumber}}</td>
						<td>{{complain.one}}</td>
						<td>{{complain.userName}}</td>
						<td>{{complain.userPhone}}</td>
						<td><input type="submit" value="删除"  ng-click="delete(complain)"/></td>
						<td><input type="submit" value="归档"  ng-click="file(complain)" /></td>

					</tr>
					<tr id="handledComplaintList"  ng-repeat="complain in handcomplains"  ng-show="handledComplaintListShow">

						<td>{{complain.uploadTime | newtime}}</td>
						<td>{{complain.jobnumber}}</td>
						<td>{{complain.one}}</td>
						<td>{{complain.userName}}</td>
						<td>{{complain.userPhone}}</td>
						<td><input type="submit" value="删除"  ng-click="delete(complain)"/></td>


					</tr>
				</tbody>
				</table>
			<div class="turnpagediv1">
				<button class="prepage1">上一页</button>
				<p class="currentpage1">当前第1页</p>
				<button class="nextpage1">下一页</button>
			</div>
			</div>
		<!--投诉管理结束-->
				
				<!--创建工单开始-->
				<div id="creatework" class="turndiv" ng-controller="createCtrl">
					<table>
					<tr><th colspan="2">特殊工单</th></tr>
					<tr>
						<td class="tds">联系人学工号：</td>
						<td id="usernum"><input type="text" placeholder="150610100" ng-model="teacherinfo.gh" ng-blur="create_getuserinfo()"/></td>
					</tr>
					<tr>
						<td class="tds">用户身份：</td>
						<td id="userstatus"><input type="text" placeholder="教师"  ng-model="teacherinfo.postion" /></td>
					</tr>
					<tr>
						<td class="tds">姓名：</td>
						<td id="username"><input type="text" placeholder="姓名" ng-model="teacherinfo.name"/></td>
					</tr>
					<tr>
						<td class="tds">电话：</td>
						<td id="userphone"><input type="text" placeholder="1830287878" ng-model="teacherinfo.phone"/></td>
					</tr>
						<tr>
						<td class="tds">地址：</td>
							<!--教师地址由管理员自己填写-->
						<td id="useraddress"><input type="text" placeholder="清雅居b" ng-model="teacherinfo.dept"/></td>
					</tr>
					<tr>
						<!--故障分类-->
						<td class="tds">故障：</td>
						<td id="ques">
							<select class="sort_con" ng-model="selectques" ng-change="chooseques()">
								<option ng-repeat="x in ques track by $index" value="{{x}}">{{x}}</option>
							</select>
						</td>
					</tr>
						<tr>
							<td rowspan="2" colspan="2">
			<input type="submit" name="submitdetails" id="submitdetails" value="提交" ng-click="managersubmit()" />
							</td>
						</tr>
				</table>
				</div>
				<!--创建工单结束-->
				<!--工单管理开始-->
		<div id="ticketMangement" class="turndiv" ng-controller="ticketmanageCtrl">
			<div id="all2">
				<ul>
					<li id="unfinish1" class="now" ng-click="managenotresolve()"><a href="#">未处理工单</a></li>
					<li id="finish1"><a href="#" ng-click="manageresolve()">已处理工单</a></li>
				</ul>
			</div>			
			<table id="alternatecolor2" class="altrowstable" style="border: 0;">				
				<thead>
					<tr>
						<th>持续时间</th>
						<th>工单号</th>
						<th>故障种类</th>
						<th>运维人员</th>
						<th>工单状态</th> <!--已归档 处理中 未处理-->
						<th>删除</th>

					</tr>
				</thead>
				<tbody>
					<tr ng-repeat=" manageticket in unmanagetickets" ng-show="unticketManagementShowValue">
						<td>{{manageticket.uploadTime | newtime}}</td>
						<td>{{manageticket.jobnumber}}</td>
						<td>{{manageticket.one}}</td>
						<td>{{manageticket.userName}}</td>
						<td>{{manageticket.isComplete | wordStatus}}</td>
						<td><input type="submit" value="删除" ng-click="deleteTicket(manageticket)"/></td>

					</tr>
					<tr ng-repeat=" manageticket in managetickets" ng-show="ticketManagementShowValue">
						<td>{{manageticket.uploadTime | newtime}}</td>
						<td>{{manageticket.jobnumber}}</td>
						<td>{{manageticket.one}}</td>
						<td>{{manageticket.userName}}</td>
						<td>{{manageticket.isComplete | wordStatus}}</td>
						<td><input type="submit" value="删除" ng-click="deleteTicket(manageticket)"/></td>

					</tr>
				</tbody>
				</table>
			<div class="turnpagediv1">
				<button class="prepage1">上一页</button>
				<p class="currentpage1">当前第1页</p>
				<button class="nextpage1">下一页</button>
			</div>
			</div>
		<!--工单管理结束-->
				<!--职位调整开始-->
				<div id="adjust" class="adjust turndiv" ng-controller="managerFaultCtrl">
					<button class="adjustButton" onclick="addKind()">添加分类</button>
					<div style="display:block;"  class="allKind" ng-repeat="x in oneLevel" >
						<div>
							<span>分类：</span><input  ng-click="get(x.oType)" id={{x.oType}} type="text" class="inputStyle" value={{x.one}}>
							<span>负责人：</span><input ng-click="getUser(x.userPhone | limitTo:-6)" id="{{x.userPhone | limitTo:-6}}" type="text" class="inputStyle" value={{x.userName}}>
							<button class="adjustButton" ng-click="updateOne(x.oType,x.userPhone | limitTo:-6)">修改</button>  <button class="adjustButton" ng-click="deleteOne(x.oType)">删除</button>
						</div>
						<%--增加一项：<input  class="inputStyle" type="text" value="键盘坏了"/>
                        <button class="adjustButton">确认增加</button>
                        <br />--%>
					</div>
					<%--二级目录：<select id="sel"  class="inputStyle" ng-model="selectedItems" ng-options="x.two for x in twoLevel"></select>
					<input id="update"  class="inputStyle" type="text" ng-click="getTwo()"  ng-model="selectedItems.two"/>
					<button class="adjustButton" ng-click="updateTwo()">确认修改</button>  <button class="adjustButton" ng-click="deleteTwo()">删除此类</button>
--%>

					<!--提示增加分类开始-->
					<div id="addKind" class="addKind" style="display:none;">
						&nbsp&nbsp&nbsp分类：<input type="text" id="uc" class="oneCatalogue" ng-model="oneLevelDirectory.one" placeholder="网络问题" /><br/>
						负责人：<input type="text" class="oneCatalogue" ng-model="oneLevelDirectory.userName" placeholder="运维人员名字" /><br/>
						<button class="sureAddBt" ng-click="add()">确认增加</button>
						<button onclick="closeBox()" class="noAddBt" >取消</button>
					</div>
					<!--提示增加分类结束-->
				</div>
				<!--职位调整结束-->


				<!--工单统计报表开始-->
					<div id="totalwork" class="turndiv" ng-controller="totalworkCtrl">
						<div class="sort">
							<a>分类:</a>
							<a class="sort_con department" ng-click="querybydepart()">部门</a>
							<a class="sort_con fault" ng-click="querybyfault()">故障</a>
							<a>年份：</a>
							<select class="sort_con" ng-model="selecttime" ng-options="t.ttt for t in times">
							</select>
						</div>
						<div id="totalwork_choice">
							<table id="department_table">
								<tr>
									<th  class="xi">部门/月份</th>
									<th>1月</th>
									<th>2月</th>
									<th>3月</th>
									<th>4月</th>
									<th>5月</th>
									<th>6月</th>
									<th>7月</th>
									<th>8月</th>
									<th>9月</th>
									<th>10月</th>
									<th>11月</th>
									<th>12月</th>
									<th>合计</th>
								</tr>
								<tr ng-repeat="(key,d) in deaprttotalwork">
									<td class="xi">{{key | isnull}}</td>
									<td>{{d[0][4][0].January | isnull}}</td>
									<td>{{d[0][3][0].February | isnull}}</td>
									<td>{{d[0][7][0].March | isnull}}</td>
									<td>{{d[0][0][0].April | isnull}}</td>
									<td>{{d[0][8][0].May | isnull}}</td>
									<td>{{d[0][6][0].June | isnull}}</td>
									<td>{{d[0][5][0].July | isnull}}</td>
									<td>{{d[0][1][0].August | isnull}}</td>
									<td>{{d[0][11][0].September | isnull}}</td>
									<td>{{d[0][10][0].October | isnull}}</td>
									<td>{{d[0][9][0].November | isnull}}</td>
									<td>{{d[0][2][0].December | isnull}}</td>
									<td>{{d[0][4][0].January+d[0][3][0].February+d[0][7][0].March+d[0][0][0].April+d[0][8][0].May+d[0][6][0].June+d[0][5][0].July++d[0][1][0].August+d[0][11][0].September+d[0][10][0].October+d[0][9][0].November+d[0][2][0].December | isnull}}</td>
								</tr>
							</table>
							<table id="fault_table">
								<tr>
									<th class="xi">故障/月份</th>
									<th>1月</th>
									<th>2月</th>
									<th>3月</th>
									<th>4月</th>
									<th>5月</th>
									<th>6月</th>
									<th>7月</th>
									<th>8月</th>
									<th>9月</th>
									<th>10月</th>
									<th>11月</th>
									<th>12月</th>
									<th>合计</th>
								</tr>
								<tr  ng-repeat="(key,f) in faulttotalwork">
									<td class="xi">{{key | isnull}}</td>
									<td>{{f[0][4][0].January | isnull}}</td>
									<td>{{f[0][3][0].February | isnull}}</td>
									<td>{{f[0][7][0].March | isnull}}</td>
									<td>{{f[0][0][0].April | isnull}}</td>
									<td>{{f[0][8][0].May | isnull}}</td>
									<td>{{f[0][6][0].June | isnull}}</td>
									<td>{{f[0][5][0].July | isnull}}</td>
									<td>{{f[0][1][0].August | isnull}}</td>
									<td>{{f[0][11][0].September | isnull}}</td>
									<td>{{f[0][10][0].October | isnull}}</td>
									<td>{{f[0][9][0].November | isnull}}</td>
									<td>{{f[0][2][0].December | isnull}}</td>
									<td>{{f[0][4][0].January+f[0][3][0].February+f[0][7][0].March+f[0][0][0].April+f[0][8][0].May+f[0][6][0].June+f[0][5][0].July++f[0][1][0].August+f[0][11][0].September+f[0][10][0].October+f[0][9][0].November+f[0][2][0].December | isnull}}</td>
								</tr>
							</table>

							<div class="turnpagediv">
							<button class="prepage">上一页</button>
								<p class="currentpage">当前第1页</p>
								<button class="nextpage">下一页</button>
							</div>
						</div>
					</div>
					<!--工单统计报表结束-->
				<!--运维人员业绩开始-->
				<div id="performances" class="turndiv" ng-controller="performanceCtrl">
					<div class="sort">
							<a>分类:</a>
							<a class="sort_con perfor" ng-click="querybyperformance()">业绩</a>
							<a class="sort_con starcomplain" ng-click="querybystar()">星级与投诉</a>
						<a>年份：</a>
								<select class="sort_con" ng-model="selecttime" ng-options="t.ttt for t in times">
								</select>
						</div>
					<table id="oper_perf_table">
								<tr>
									<th  class="xi">人员/月份</th>
									<th>1月</th>
									<th>2月</th>
									<th>3月</th>
									<th>4月</th>
									<th>5月</th>
									<th>6月</th>
									<th>7月</th>
									<th>8月</th>
									<th>9月</th>
									<th>10月</th>
									<th>11月</th>
									<th>12月</th>
									<th>合计</th>
								</tr>
								<tr ng-repeat="(key,p) in performancetoper">
									<td class="xi">{{key | isnull}}</td><!--名字-->
									<td>{{p[0][4][0].January | isnull}}</td>
									<td>{{p[0][3][0].February | isnull}}</td>
									<td>{{p[0][7][0].March | isnull}}</td>
									<td>{{p[0][0][0].April | isnull}}</td>
									<td>{{p[0][8][0].May | isnull}}</td>
									<td>{{p[0][6][0].June | isnull}}</td>
									<td>{{p[0][5][0].July | isnull}}</td>
									<td>{{p[0][1][0].August | isnull}}</td>
									<td>{{p[0][11][0].September | isnull}}</td>
									<td>{{p[0][10][0].October | isnull}}</td>
									<td>{{p[0][9][0].November | isnull}}</td>
									<td>{{p[0][2][0].December | isnull}}</td>
									<td>{{p[0][4][0].January+p[0][3][0].February+p[0][7][0].March+p[0][0][0].April+p[0][8][0].May+p[0][6][0].June+p[0][5][0].July++p[0][1][0].August+p[0][11][0].September+p[0][10][0].October+p[0][9][0].November+p[0][2][0].December | isnull}}</td>
								</tr>
							</table>
							<table id="oper_star_table">
								<tr>
									<th class="bold">人员</th>
									<th  class="bold">星级</th>
									<th class="bold">投诉</th>
								</tr>
								<tr ng-repeat="s in perstar">
									<td>{{s.userName | isnull}}</td>
									<td>{{s.commentStar | isnull}}</td>
									<td>{{s.commentContent | isnull}}</td>
								</tr>
							</table>
					<div class="turnpagediv">
						<button class="prepage">上一页</button>
						<p class="currentpage">当前第1页</p>
						<button class="nextpage">下一页</button>
					</div>
				</div>
				<!--运维人员业绩结束-->

				<%--角色分配  开始--%>
				<div id="operatorlist" class="turndiv" ng-controller="operlistCtrl">
					<button id="operlistadd" ng-click="addoperlist()">添加</button>
					<table id="operlisttable">
						<tr>
							<th class="bold">工号</th>
							<th  class="bold">姓名</th>
							<th class="bold">操作</th>
						</tr>
						<tr>
							<td>1111111</td>
							<td>运维1</td>
							<td><button class="operlistremove">移除</button></td>
						</tr>
					</table>

					<div id="operadddiv">
						工号：<br>
						<input type="text" id="writeopernum" placeholder="请输入工号"/>
						<br>
						<input class="addoperbtn" type="button" value="确认添加">
						<input class="canceladdoperbtn" type="button" value="取消" ng-click="canceladdoperbtn()"/>

					</div>
				</div>
				<%--角色分配  结束--%>

				<!--网站管理开始-->
				<div id="website_manage" class="turndiv" ng-controller="siteCtrl">
					<!--服务电话开始-->
					<div id="phone2">
						<label>服务电话：</label>
					<input type="tel" name="service_phone" id="service_phone" ng-model="servicephone" maxlength="8"/>
					<input type="button" name="alterphone" id="alterphone" value="修改" ng-click="alterservicephone()"/>
					</div>
					<!--服务电话结束-->
					<!--二维码上传开始-->
					<div id="erweima2">
						<label>APP二维码：</label>

					<input type="file" name="erweima" id="erweima" value="" />
					<input type="button" name="erweimasub" id="erweimasub" value="提交" />
					</div>
					<!--二维码上传结束-->
				</div>
				<!--网站管理结束-->
			</div>		
		</div>
		<!--右边结束-->
		<div id="footer" class="footer">
			<p class="footerWord">版权所有&nbsp;四川旅游学院</p>
		</div>
		<!--引入交互所需文件-->
		<script type="text/javascript" src="<%= request.getContextPath()%>resources/js/jquery-3.1.1.min.js"></script>
		<script src="<%= request.getContextPath()%>resources/js/angular.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="<%= request.getContextPath()%>resources/js/managerController.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="<%= request.getContextPath()%>resources/js/jNotify.jquery.js"></script>
	</body>
</html>
